home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / unix / ch10 / 10fig08.wrl < prev    next >
Text File  |  1996-09-22  |  675b  |  33 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Blinking ball
  8.         Shape {
  9.             appearance Appearance {
  10.                 material DEF BallColor Material {
  11.                     diffuseColor 0.4 0.4 0.4
  12.                 }
  13.             }
  14.             geometry Sphere { }
  15.         },
  16.     # Animation clock
  17.         DEF Clock TimeSensor {
  18.             cycleInterval 1.0
  19.             loop TRUE
  20.         },
  21.     # Animation path
  22.         DEF ColorPath ColorInterpolator {
  23.             key [ 0.0, 0.5, 0.5, 1.0 ]
  24.             keyValue [
  25.                 0.0 1.0 0.0,  0.0 1.0 0.0,
  26.                 0.0 0.0 1.0,  0.0 0.0 1.0,
  27.             ]
  28.         }
  29.     ]
  30. }
  31. ROUTE Clock.fraction_changed  TO ColorPath.set_fraction
  32. ROUTE ColorPath.value_changed TO BallColor.set_emissiveColor
  33.